<template>
  <div class="recommend">
    <div class="recommend-item" v-for="(item,index) in recommend" :key="index">
      <a :href="item.item_url">
        <img :src="item.image" alt="" @load="recLoad">
        <div class="title">{{item.title}}</div>
      </a>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Detailrec',

  data() {
    return {
      
    };
  },
  props:{
    recommend:{

    }
  },
  mounted() {
    
  },

  methods: {
    aaa(){
      console.log(this.recommend);
    },
    recLoad(){
      this.$bus.$emit('recLoad')
    }
  },
};
</script>

<style lang="css" scoped>
.recommend{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  position: relative;
}
.recommend-item{
  padding-bottom: 30px;
  position: relative;
  width: 48%;
  
  
  position: relative;
  /* border: 1px solid black; */
  text-align: center;
}
.recommend-item img{
  width: 48vw;
  margin-bottom: 5px;
}
.title{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
}
</style>